function Father() {};
Father.prototype.sayHi = function() {
    console.log('Hi');
};

function create(obj) {
    function F() {};
    F.prototype = obj;
    return new F();
};


let s1 = create(Father.prototype);

s1.sayHi();

